package com.eclipse.e0112_json.to_String;

import java.util.ArrayList;
import java.util.List;

public class Test {
	public static void main(String[] args) {
		List<Student> list = new ArrayList<>();
		
		Student s1 = new Student("name1");
		Student s2 = new Student("name2");
		
		list.add(s1);
		list.add(s2);
		System.out.println(list);
	}
}

class Student{
	String name;

	Student(String name){
		this.name = name;
	}

	@Override
	public String toString() {
		return "Student [name=" + name + "]";
	}
	
	
}